/** @format */

import { defineComponent, shallowRef } from 'vue'

export default defineComponent({
  setup() {
    const theDialogVisible = shallowRef(false)
    return () => {
      return (
        <>
          <el-space direction="vertical">
            <strong>TsxComp - 使用 tsx 写组件</strong>
            <el-button
              type="primary"
              onClick={() => {
                theDialogVisible.value = true
              }}>
              TsxComp - 使用 tsx 写组件
            </el-button>
          </el-space>
          <el-dialog v-model={theDialogVisible.value} title="Tips" width="500">
            <span> This is a message</span>
          </el-dialog>
        </>
      )
    }
  },
})
